#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H

#include <QtGui/QMainWindow>
#include <QGraphicsScene>
#include <QGraphicsView>

#include "gs.h"

using namespace gs;

namespace gs {
class GameScene : public QGraphicsScene
{
    Q_OBJECT
public:
    explicit GameScene(int x, int y, int w, int h);
protected:
    void drawBackground(QPainter *painter, const QRectF &rect);
};

class GameWindow : public QMainWindow
{
    Q_OBJECT
protected:
    void createScene();
    void createView();

    GameScene* scene;
    QGraphicsView* view;
    GameTable* table;
    GameDialogManager* dialogManager;
    //GamePhaseController* controller;
public:
    GameWindow(QWidget *parent = 0);
    ~GameWindow();
    GameDialogManager* getDialogs(){return dialogManager;}
    GameTable* getTable(){return table;}
    static const int SCENE_WIDTH=1024;
    static const int SCENE_HEIGHT=600;
    static const int SCENE_CENTER_X = SCENE_WIDTH/2;
    static const int SCENE_CENTER_Y = SCENE_HEIGHT/2;
};
}
#endif // GAMEWINDOW_H
